<?php

namespace backend\models\form;

/**
 * This is the model class for table "xqlh_project_major_basis".
 *
 * @property string $uuid
 * @property string $project_basic_info_id
 * @property string $supporting_majors
 * @property integer $course_instructor_number
 * @property integer $number_one
 * @property integer $biteacher_number
 * @property string $biteacher_ratio
 * @property integer $status
 * @property string $create_time
 * @property string $update_time
 * @property string $create_users_id
 * @property string $update_users_id
 */
class FormProjectMajorBasis extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'form_project_major_basis';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['uuid', 'project_basic_info_id', 'supporting_majors', 'course_instructor_number', 'number_one', 'biteacher_number', 'biteacher_ratio', 'create_time', 'update_time', 'create_users_id', 'update_users_id'], 'required'],
            [['course_instructor_number', 'number_one', 'biteacher_number', 'status'], 'integer'],
            [['create_time', 'update_time'], 'safe'],
            [['uuid', 'project_basic_info_id', 'create_users_id', 'update_users_id'], 'string', 'max' => 36],
            [['supporting_majors'], 'string', 'max' => 50],
            [['biteacher_ratio'], 'string', 'max' => 30],


            [['biteacher_ratio'], 'string', 'max' => 30],
            [['biteacher_ratio',], 'match', 'pattern' => '/^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/', 'message' => '{attribute}必须是整数或保留两位小数！'],

        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'uuid' => 'Uuid',
            'project_basic_info_id' => '申报项目基础信息id|xqlh_project_basic_info',
            'supporting_majors' => '依托专业或专业',
            'course_instructor_number' => '专业课教师数',
            'number_one' => '副高及以上人数',
            'biteacher_number' => '双师型教师',
            'biteacher_ratio' => '双师型教师占比',
            'status' => '状态:1 使用;2 注销',
            'create_time' => '添加时间',
            'update_time' => '修改时间',
            'create_users_id' => '添加人|users',
            'update_users_id' => '修改人|users',
        ];
    }
}
